package com.mvc.base.model;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;

import com.mvc.framework.model.CompositeKeyAuditableEntity;

@IdClass(UserCompanyPK.class)
@Entity(name = "B_USER_COMPANY")
public class UserCompany extends CompositeKeyAuditableEntity {

	@Id
	private Integer	companyId;
	@Id
	private Integer	userId;

	public Integer getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Integer companyId) {
		this.companyId = companyId;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}
}

class UserCompanyPK implements Serializable {
	private Integer	companyId;
	private Integer	userId;

	public Integer getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Integer companyId) {
		this.companyId = companyId;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}
}